Welcome Guest | Sign in | Register
Windows Controls - DotNet Programming Interview Questions and Answers | LucentBlackBoard | LucentBlackBoard.com

Home > Technical Interviews > Computer Science & Engineering > DotNet Programming > Windows Controls Questions and Answers

1. How can we auto size a button to fit its text?

The Button control has the AutoSize property, which can be set to true or false. If we set the value of theAutoSize property to true, then the button control automatically alters its size according to the content displayed on it.

2. How can we display an icon or a bitmap image on the Button control?

The Button class contains the Image property, which is used to set an image on the Button control. We can also set the alignment of the image by using the ImageAlign property of the Button class.

3. Which method is used to generate the click event of the Control class for the Button control in C#?

The PerformClick() method of the Button class is used to generate the Click event of theSystem.Windows.Forms.Control class.

4. A Windows Form will not show the Minimize, Maximize, and Close buttons, if the ControlBox property of the form is set to False. (True/False)

True

5. How is anchoring different from docking?

Docking refers to attaching a control to either an edge (top, right, bottom, or left) or the client area of the parent control. On the other hand, anchoring is a process in which you need to specify the distance that each edge of your control maintains from the edges of the parent control.




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.